package com.cyd.activity;

import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.cyd.base.BaseActivity;
import com.cyd.homefamily.R;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;

public class LoginActivity extends BaseActivity {

	@ViewInject(R.id.btn_login)
	Button mBtn_Log;

	@ViewInject(R.id.btn_reg)
	Button mBtn_Reg;

	@ViewInject(R.id.tv_forget_password)
	TextView mTv_Forget_Password;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_login);
		mAbTitleBar.setVisibility(View.GONE);
		ViewUtils.inject(this);
		setTextViewStyle(mTv_Forget_Password);
	}

	private void setTextViewStyle(TextView tv) {
		tv.getPaint().setAntiAlias(true);
		tv.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
	}

	@OnClick(value = { R.id.btn_login, R.id.btn_reg, R.id.tv_forget_password })
	public void onClick(View view) {
		switch (view.getId()) {
		case R.id.btn_login:
			startActivity(this, MainActivity.class);
			break;
		case R.id.btn_reg:
			startActivity(this, RegisterBaseActivity.class);
			break;
		case R.id.tv_forget_password:
			startActivity(this, PersonalInformationActivity.class);
			break;
		}
	}

	@Override
	public void initViews() {
		// TODO Auto-generated method stub
		addActivity(this);
	}

	@Override
	public void initEvents() {
		// TODO Auto-generated method stub

	}
}
